package com.xframe.domain.emnus;

public enum EncryptionType {
    NONE("NONE"),
    MD5("MD5"),
    SHA1("SHA1"),
    SHA256("SHA-256"),
    AES("AES");

    private final String name;

    EncryptionType(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public static EncryptionType fromString(String value) {
        try {
            return valueOf(value.toUpperCase());
        } catch (IllegalArgumentException e) {
            return NONE;
        }
    }
}
